package com.hsjk.szwj.module.mp.dal.mysql;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hsjk.szwj.framework.mybatis.core.mapper.BaseMapperX;
import com.hsjk.szwj.module.mp.dal.dataobject.MpConfigDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/08 16:00
 **/
@Mapper
public interface IMpMapper extends BaseMapperX<MpConfigDO> {

    MpConfigDO getMp();

    default MpConfigDO getSystemMpByTenantId(Long tenantId) {
        return selectOne(new LambdaQueryWrapper<MpConfigDO>()
                .eq(MpConfigDO::getTenantId, tenantId));
    }
}
